<?php

use yii\db\Migration;

class m161022_081743_create_class extends Migration
{
    public function up()
    {
        $this->createTable('kd_classname',[
            'class_id'=>$this->primaryKey()->comment('班级序号'),
            'yey_id'=>$this->integer(11)->comment('所属幼儿园序号'),
            'class_name'=>$this->string(20)->notNull()->comment('班级名称'),

            'zb_teacher'=>$this->string(20)->null()->comment('主班老师'),
            'fb_teacher'=>$this->string(20)->null()->comment('副班老师'),
            'sh_teacher'=>$this->string(20)->null()->comment('生活老师'),
            'stu_num'=>$this->string(20)->null()->comment('幼儿人数'),





            'created_by'=>$this->string(20)->notNull()->comment('创建人'),
            'create_time'=>$this->dateTime()->notNull()->comment('添加时间'),
            'update_time'=>$this->dateTime()->notNull()->comment('最后修改时间'),
            'fengcun_ren'=>$this->string(20)->notNull()->comment('封存人'),
            'fengcun_time'=>$this->dateTime()->comment('班级封存时间'),
            'status'=>$this->smallInteger()->comment('状态'),
            ]);

    }

    public function down()
    {
        $this->dropTable('kd_classname');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
